<template>
    <div class="worklist" :style="{width:winWidth+'px'}">
          <div class="title">
            <span>- 推荐商品 -</span>
        </div>
        <ul>
            <li v-for="item in worklist" :key="item">
                <a>
                    <div class="workimg">
                        <img :src="item.url" alt="">
                    </div>
                    <div class="workinfo" :style="{width:winWidth-115+'px'}">
                        <p class="name">{{item.name}}</p>
                        
                        <p class="moneyInfo"><span>拼团:{{item.x}}</span>  <span>原价:{{item.y}}</span></p>
                        <span class="pinfo">拼团{{item.c}}</span>
                        <div class="wbtn">
                            <a class="fbtn">分享</a>
                            <a class="sbtn">开团</a>
                        </div>
                    </div>
                </a>
            </li>
        </ul>
    </div>
</template>

<script>
    export default {
        name: "component_name",
      data () {
    return {
        winWidth:"",
        worklist:[
            {
                name:'Apple iPhone 8 Plus 64GB 红色特别版 移动联通电信4G手机',
                x:'12',
                y:'199',
                c:'765',
                url:'../../static/image/vip.jpg'
            },
            {
                name:'Apple iPhone 8 Plus 64GB 红色特别版 移动联通电信4G手机',
                x:'12',
                y:'199',
                c:'765',
                url:'../../static/image/vip.jpg'
            },
            {
                name:'Apple iPhone 8',
                x:'12',
                y:'199',
                c:'765',
                url:'../../static/image/vip.jpg'
            }
        ]
    };
  },
  created:function(){
      wx.getStorageSync('userSystem')
      this.winWidth = wx.getStorageSync('userSystem').windowWidth
  }
    }
</script>

<style lang="css" scoped>
    
</style>